package com.tianbao54.kotlin_01

//伴生对象扩展
class CompanionObjectExtension {

    companion object MyObject{

    }
}

fun CompanionObjectExtension.MyObject.method () {
    println("Companion function extension")
}

fun main(args: Array<String>) {
    CompanionObjectExtension.MyObject.method()
}